package com.visizen.wisdomclass.server.client;

import com.visizen.wisdomclass.server.model.WcTopicHot;
import com.visizen.wisdomclass.server.model.WcTopicHotExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WcTopicHotMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_hot
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcTopicHotSqlProvider.class, method="countByExample")
    int countByExample(WcTopicHotExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_hot
     *
     * @mbggenerated
     */
    @DeleteProvider(type=WcTopicHotSqlProvider.class, method="deleteByExample")
    int deleteByExample(WcTopicHotExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_hot
     *
     * @mbggenerated
     */
    @Delete({
        "delete from wc_topic_hot",
        "where hot_id = #{hot_id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long hot_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_hot
     *
     * @mbggenerated
     */
    @Insert({
        "insert into wc_topic_hot (hot_id, topic_id, ",
        "create_time, expiration_time)",
        "values (#{hot_id,jdbcType=BIGINT}, #{topic_id,jdbcType=BIGINT}, ",
        "#{create_time,jdbcType=TIMESTAMP}, #{expiration_time,jdbcType=TIMESTAMP})"
    })
    int insert(WcTopicHot record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_hot
     *
     * @mbggenerated
     */
    @InsertProvider(type=WcTopicHotSqlProvider.class, method="insertSelective")
    int insertSelective(WcTopicHot record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_hot
     *
     * @mbggenerated
     */
    @SelectProvider(type=WcTopicHotSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="hot_id", property="hot_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="topic_id", property="topic_id", jdbcType=JdbcType.BIGINT),
        @Result(column="create_time", property="create_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="expiration_time", property="expiration_time", jdbcType=JdbcType.TIMESTAMP)
    })
    List<WcTopicHot> selectByExample(WcTopicHotExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_hot
     *
     * @mbggenerated
     */
    @Select({
        "select",
        "hot_id, topic_id, create_time, expiration_time",
        "from wc_topic_hot",
        "where hot_id = #{hot_id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="hot_id", property="hot_id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="topic_id", property="topic_id", jdbcType=JdbcType.BIGINT),
        @Result(column="create_time", property="create_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="expiration_time", property="expiration_time", jdbcType=JdbcType.TIMESTAMP)
    })
    WcTopicHot selectByPrimaryKey(Long hot_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_hot
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcTopicHotSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WcTopicHot record, @Param("example") WcTopicHotExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_hot
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcTopicHotSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WcTopicHot record, @Param("example") WcTopicHotExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_hot
     *
     * @mbggenerated
     */
    @UpdateProvider(type=WcTopicHotSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WcTopicHot record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_topic_hot
     *
     * @mbggenerated
     */
    @Update({
        "update wc_topic_hot",
        "set topic_id = #{topic_id,jdbcType=BIGINT},",
          "create_time = #{create_time,jdbcType=TIMESTAMP},",
          "expiration_time = #{expiration_time,jdbcType=TIMESTAMP}",
        "where hot_id = #{hot_id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(WcTopicHot record);
}